package com.dongdong.api;

import com.dongdong.em.Result;
import com.dongdong.model.TbUser;
import com.dongdong.vo.AddressVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("dongdong-user-service")
public interface UserAPI {

    @GetMapping("user/getUserByName")
    public Result<TbUser> getUserByName(@RequestParam String username);

    @GetMapping("address/getAddressById")
    public Result<AddressVO> getAddressById(@RequestParam Long addressId);
}
